//
//  DBHistoryDataSr03.h
//  CareRingApp
//
//  Created by Linktop on 2022/8/15.
//  用于测试 存储所有收到的历史数据

#import <Foundation/Foundation.h>
#import "SRHistoryDataSR03.h"
#import "NSMutableDictionary+SleepUsed.h"
NS_ASSUME_NONNULL_BEGIN
@class FMDatabase;
@class DBSleepData;
@class ReadyDrawObj;

@interface DebugDBHistoryDataALL : NSObject

@property(assign, nonatomic)int cId;
@property(strong, nonatomic)NSNumber *time; // 时间戳
//@property(strong, nonatomic)NSNumber *userId;  // 所属用户ID
@property(strong, nonatomic)NSString *macAddress; //所属用户的账号

@property(strong, nonatomic) NSNumber *deviceModifyHeartRate; // 设备补偿后的心率
@property(strong, nonatomic) NSNumber * heart_ori_1,  * heart_ori_2, * heart_ori_3; // 原始心率 1 2 3
@property(strong, nonatomic)NSNumber *hrv; // 预留

@property(strong, nonatomic) NSNumber *bloodOxygen;
@property(strong, nonatomic) NSNumber *skinTemp;
@property(strong, nonatomic) NSNumber *steps; // 累加值
@property(strong, nonatomic) NSNumber *soprtTimes; // 运动计数 五分钟内的运动计数
@property(assign, nonatomic) BOOL isSos;
@property(strong, nonatomic) NSNumber *dataUuid; // 记录唯一标识
@property(strong, nonatomic) NSNumber *isWear; //是否佩戴
@property(assign, nonatomic)SR03HIS_MEASURE_TYPE measureType;  // 测量模式
@property(strong, nonatomic) NSNumber *isSportMode;  // 是否是运动模式的数据
@property(assign, nonatomic) BOOL lis2ds12; //1 表示 LIS2DS12 加速度传感器使用设备原始计步数据

/*
 * SR03HIS_MEASURE_TYPE_HR : heart_ori_3 有值, bloodOxygen 无值
 * SR03HIS_MEASURE_TYPE_OXYGEN : heart_ori_3 无值, bloodOxygen 有值
 */

//创建数据库
+(void)createTable;



/// 批量插入
/// @param account 当前账户
/// @param dataArray 数据数组
/// @param cmpBlk 回调
+(void)mutiInsertAlldata:(NSString * _Nonnull)macAdres Array:(NSArray <SRHistoryDataSR03 *> *)dataArray       Cpmplete:(void(^)(NSMutableArray<SRHistoryDataSR03 *> *dataArray, BOOL isSucc))cmpBlk;


// 批量删除
+(void)deleteFromTime:(NSTimeInterval)time Account:(NSString *)macAdres Cpmplete:(void(^)( BOOL isSucc))cmpBlk;



@end

NS_ASSUME_NONNULL_END
